package com.corn.kafkastream.serdes;

import com.corn.kafkastream.entity.User;
import org.apache.kafka.common.serialization.*;

/**
 * @author : Jim Wu
 * @version 1.0
 * @function :
 * @since : 2022/9/20 10:43
 */

public class BusinessJsonSereds {

    static public final class UserSered extends Serdes.WrapperSerde<User> {
        public UserSered() {
            super(new JsonSerializer<>(), new JsonDeSerializer<>(User.class));
        }
    }

    static public Serde<User> User() {
        return new BusinessJsonSereds.UserSered();
    }
}
